package com.yang.libs.ui

import android.content.Intent
import android.os.Handler
import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.gyf.immersionbar.BarHide
import com.gyf.immersionbar.ktx.immersionBar
import com.xxx.lib.base.BaseActivity
import com.xxx.lib.constant.ARouterLink
import com.yang.libs.BaseApplication
import com.yang.libs.databinding.ActivityLuanchBinding

/**
 * 启动页
 */
@Route(path = ARouterLink.LINK_LUANCH_ACTIVITY)
class LuanchActivity : BaseActivity() {

    private val binding by lazy { ActivityLuanchBinding.inflate(layoutInflater) }

    override fun initContentView(): View? = binding.root

    override fun init() {
        BaseApplication.initSDK()
        immersionBar {
            fitsSystemWindows(false)
            hideBar(BarHide.FLAG_HIDE_STATUS_BAR)
        }
        Handler().postDelayed({
            startActivity(Intent(this@LuanchActivity, MainActivity::class.java))
            finish()
        }, 2000)

    }
}